<template>
  <div class="hello">
    <br><br><br><br>
    <!-- 讨论列表开始 -->
    <component
        :is="currentView"
        @toPostView="toAddPost"
      ></component>
    <!-- <PostList></PostList> -->
    <!-- 讨论列表开始 -->
  </div>
</template>
    
<script>
import PostList from "@/components/post/PostList.vue";
export default {
  name: "PostView",
  props: {},
  components: { PostList },
  data() {
    return {
      currentView: "PostList",
    };
  },
  methods:{
    toAddPost(){
      this.$emit("toProductView")
    }
  }
};
</script>
    
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
</style>
    